package com.health.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;

@RestController
public class IndexController {

    @GetMapping("index")
    public  Map index(){
        Map map=new HashMap();
        map.put("love","梁山贼寇");
        return map;
    }

   // @GetMapping(value = "test",produces = "text/html;charset=utf-8")
    @GetMapping(value = "test")
    public  String test(HttpServletResponse response) throws UnsupportedEncodingException {
        // response.setContentType("text/html;charset=utf-8");

        return  new String("江湖有个大佬");
    }
}
